﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Description;
using System.Text;
using System.Threading.Tasks;

namespace WFExtended.Samples.ServiceModel
{
    public class ServiceHttpHost<T> : AServiceHost<T>
          where T : class, new()
    {
        public override Uri Uri
        {
            get { return new Uri("http://localhost:8889"); }
        }

        public override List<System.ServiceModel.Description.ServiceEndpoint> ServiceEndpoints
        {
            get 
            {
                return new List<System.ServiceModel.Description.ServiceEndpoint>()
                {
                    new ServiceEndpoint(ContractDescription.GetContract(typeof(T)))
                    {
                        Address = new EndpointAddress("http://localhost:8889/ws"),
                        Binding = new WSHttpBinding(),
                    }
                };
            }
        }
    }
}
